package com.gs.mybatisflextest.vo;


import com.gs.mybatisflextest.model.*;
import com.mybatisflex.annotation.RelationOneToMany;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.ArrayList;
import java.util.List;

/**
 * 自定义查询需要展示的VO
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class UserVo extends TbUser {

    @RelationOneToMany(selfField = "id", targetField = "userId")
    private List<TbAdress> adressList = new ArrayList<>();


    @RelationOneToMany(selfField = "id", targetField = "userId")
    private List<TbDept> deptList = new ArrayList<>();

    @RelationOneToMany(selfField = "id", targetField = "userId")
    private List<TbBook> bookList = new ArrayList<>();

    @RelationOneToMany(selfField = "id", targetField = "userId")
    private List<TbTeacher> teacherList = new ArrayList<>();

}
